package com.jkoss.dao.jy;

import com.jkoss.pojo.jy.Stucompany;
import com.jkoss.pojo.jy.StucompanyExample;
import com.jkoss.tool.Page;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestMapping;

public interface StucompanyMapper {
	
	@Select("SELECT  a.*, b.jyname ,c.ename from t_stu_company a,t_jiuyecomps b,t_emps c "
			+ "where a.jyid=b.jyid and a.eid=c.eid ORDER BY a.jygjID")
	@ResultMap("com.jkoss.dao.jy.StucompanyMapper.BaseResultMap2")
	List<Stucompany> listPageSc(Page<Stucompany> page);
	
	@Select("SELECT  a.*, b.jyname ,c.ename from t_stu_company a,t_jiuyecomps b,t_emps c "
			+ "where a.jyid=b.jyid and a.eid=c.eid and a.jygjID=${jygjID}")
	@ResultMap("com.jkoss.dao.jy.StucompanyMapper.BaseResultMap2")
	Stucompany findById(@Param("jygjID") Integer jygjID);
	
	
	@Select("SELECT  * from t_stu_company where jyid=${jyid}")
	@ResultMap("com.jkoss.dao.jy.StucompanyMapper.BaseResultMap2")
	Stucompany findByJyid(@Param("jyid") Integer jyid);
	
	
	List<Stucompany> listPageByJyidAndEid(Page<Stucompany> page);
	
    int countByExample(StucompanyExample example);

    int deleteByExample(StucompanyExample example);

    int deleteByPrimaryKey(Integer jygjID);

    int insert(Stucompany record);

    int insertSelective(Stucompany record);

    List<Stucompany> selectByExample(StucompanyExample example);

    Stucompany selectByPrimaryKey(Integer jygjID);

    int updateByExampleSelective(@Param("record") Stucompany record, @Param("example") StucompanyExample example);

    int updateByExample(@Param("record") Stucompany record, @Param("example") StucompanyExample example);

    int updateByPrimaryKeySelective(Stucompany record);

    int updateByPrimaryKey(Stucompany record);

	

	

	

	
}